﻿using IM.Easy.Entity.System;
using IM.Easy.SystemServices.Dtos;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.SystemServices.IServices
{
    /// <summary>
    /// 菜单服务
    /// </summary>
    public interface IMenuService
    {
        /// <summary>
        /// 获取用户菜单->普通用户
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<SysMenu> GetMenuTreeByUserId(long userId);


        /// <summary>
        /// 获取所有的菜单树-> 超级管理员用
        /// </summary>
        /// <returns></returns>
        List<SysMenu> GetMenuTree();

        /// <summary>
        /// 获取菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        SysMenu GetMenu(long id);

        /// <summary>
        /// 获取菜单
        /// </summary>
        /// <param name="parm"></param>
        /// <returns></returns>
        SysMenu GetMenu(MenuInfoQueryDto parm);

        /// <summary>
        /// 添加菜单
        /// </summary>
        /// <param name="menu"></param>
        /// <returns>返回当前菜单ID</returns>
        long AddMenu(SysMenu menu);

        bool UpdateMenu(SysMenu menu);

        /// <summary>
        /// 删除菜单
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteMenu(long id);

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <returns></returns>

        List<SysMenu> GetMenuList(MenuQueryDto queryDto);
    }
}
